#include <bits/stdc++.h>
using namespace std;

int main() {
#ifndef __SKT__
    freopen("alex.in", "r", stdin);
    freopen("alex.out", "w", stdout);
#endif
    double h, w;
    while(cin>>h>>w) {
        if(h > w) swap(h, w);
        double ans;
        ans = h / 2;
        if(h * 3 >= w) {
            ans = max(ans, w / 3);
        } else {
            ans = max(ans, h);
        }
        printf("%.6f\n", ans); 
    }
    return 0;
}
